import request from '@/utils/request'
export default {
    list(pid) {
        const url = 'folder/index'
        return request.post(url, { pid })
    },
    add(pid, name) {
        const url = 'folder/add'
        return request.post(url, { pid, name })
    },
    update(oldPath, newPath) {
        const url = 'folder/update'
        return request.post(url, { oldPath, newPath})
    },
    delete(id) {
        const url = 'folder/delete'
        return request.post(url, { id })
    }
}
